import Router from '@koa/router'
import {
    deleteParkByIdController,
    getParkPageController,
    postParkController,
    putParkByIdController,
    getParkOptionListController,
    getParkEmptySpaceCntController
} from '../controllers/park'

const parkRouter = new Router({
    prefix: '/park',
})

// 用户的增删改查
parkRouter.get('/', getParkPageController) // 获取用户列表
parkRouter.get('/option-list', getParkOptionListController) // 获取用户列表
parkRouter.get('/empty-space-cnt', getParkEmptySpaceCntController) // 获取停车场空余车位数
parkRouter.post('/', postParkController) // 添加用户
parkRouter.put('/:id', putParkByIdController) // 修改用户信息
parkRouter.delete('/:id', deleteParkByIdController) // 删除用户

export default parkRouter
